PROGRAM   := libdriver.a
SRCDIRS   := .
SRCEXTS   := .c

INCDIR    := ../include

LDFLAGS   :=
LDFLAGS   +=

-include ../MK/Makefile.x86


.PHONY : all deps objs clean cleanall rebuild

all : deps $(PROGRAM)

deps:
	gcc -MM -MD *.c

# Rules for producing the objects.
#---------------------------------------------------
objs : $(OBJS)

%.o : %.c
	$(CC) -c  $(CFLAGS) -o$@ $<

%.o : %.asm
	$(NASM) -g  $<

# Rules for producing the executable.
#----------------------------------------------
$(PROGRAM) : $(OBJS)
	ar rcs $@ $(OBJS)

-include $(DEPS)

rebuild: clean all

clean :
	@$(RM) -f *.o *.d *.a semantic.cache

cleanall: clean
	@$(RM) -f $(PROGRAM) *.o semantic.cache

